<#macro initService>
<script type="text/javascript">
    var service = new longService('${request.getRequestURI()}');
    //S.page.size=3;
    LC.attach('${request.getRequestURI()}', service);
    LC.initToolbar({
        'new': LC.S.tools.toolNew,
        'detail': LC.S.tools.toolDetail,
        'remove': LC.S.tools.toolRemove
    });
    $(document).ready(function (e) {
        LC.S.fillQueryForm();
        LC.S.query();
    });
</script>
</#macro>
<#macro pageList clusters>
    <#assign page=clusters.page>
<div class="page">
    <span class="pageleft">
        共<span>${page.sum}</span>条记录
        每页<input type="number" name="page.size" value="${page.size}" id="pageSize" onChange="LC.S.page.changeSize(this.value)"
                 min="5" max="100"/>条
        共<span>${page.count}</span>页
        当前第<span>${page.index}</span>页
        本页<span>${clusters.list?size}</span>条记录
    </span>
    <span class="pageright">
        <a href="javascript:LC.goFirst()">首页</a>
        <a href="javascript:LC.goPrev()">上一页</a>
        <a href="javascript:LC.goNext()">下一页</a>
        <a href="javascript:LC.goEnd()">尾页</a>
        跳到<select id="pageIndex" onchange="LC.go(this.value)">
        <#list 1..page.count as n>
            <option value="${n}">${n}</option>
        </#list>
    </select>页
    </span>
</div>
<script type="text/javascript">
    LC.setPage({
        count:${page.count!0},
        index: ${page.index!1},
        size:${page.size!20},
        sum:${page.sum!0}
    });
    $('#pageIndex').val(${page.index});
</script>
</#macro>